
-- =============================================
-- Author:		Christopher Navarro
-- Create date: 6/12/12
-- Description: Lista todo los aportes de un tema
-- =============================================
Alter PROCEDURE ListarAporteTema 
	-- Add the parameters for the stored procedure here
	@Idtema int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	Select 
		--Info Aporte
		A.id_aporte,
		A.mensaje,
		--Info Usuario
		U.nombre +' '+U.apellido1+' '+U.apellido2 Usuario

from taporte A
	Inner Join tusuario U on U.id_Usuario = A.id_usuario
	
Where A.id_tema = @Idtema
END
GO
